package com.mdinfo.gw.door.service

import com.mdinfo.base.common.bean.CommonResult
import com.mdinfo.base.common.bean.DataGrid
import com.mdinfo.gw.door.param.*
import com.mdinfo.gw.door.vo.DoorCardListDoorVo
import com.mdinfo.gw.door.vo.DoorListByDoorAccessIdVo
import com.mdinfo.gw.door.vo.DoorListDoorContainChildrenVo
import com.mdinfo.gw.door.vo.DoorListQueryVo

/**
 * Created by Administrator on 2018/1/12.
 */
interface IDoorService {

    /**列表查询*/
    fun listQuery(param: DoorListQueryParam)
            :CommonResult<DataGrid<DoorListQueryVo>>

    /**添加*/
    fun add(param: DoorAddParam): CommonResult<Void>

    /**修改*/
    fun modify(param: DoorModifyParam): CommonResult<Void>

    /**删除*/
    fun toDel(param: DoorToDelParam): CommonResult<Void>

    /**获取本部门所有的门*/
    fun listAll(): CommonResult<List<DoorCardListDoorVo>>

    /**根据门禁id获取门禁分页列表*/
    fun listByDoorAccessId(param: DoorListByDoorAccessIdParam)
            : CommonResult<DataGrid<DoorListByDoorAccessIdVo>>

    /**获取本部门和下属部门的所有门*/
    fun listDoorContainChildren(): CommonResult<List<DoorListDoorContainChildrenVo>>

    /**开门*/
    fun toOpen(param: DoorToOpenParam): CommonResult<Void>

    /**关门*/
    fun toClose(param: DoorToCloseParam): CommonResult<Void>
}